package com.ruicar.afs.cloud.common.modules.afscorebusiness.enums;

import lombok.Getter;

/**
 * 放款审核状态（放款审核端状态）
 *
 * @author xueyu.ma
 */
@Getter
public enum ApplyStatusEnum {
    /**
     * 放款待提交
     */
    LOAN_WAIT_SUBMIT("waitSubmit", "放款待提交"),
    /**
     * 放款预处理
     */
    LOAN_PRE_PROCESS("preProcess", "放款预处理"),
    /**
     * 放款队列
     */
    LOAN_QUEUE("queue", "放款队列"),
    /**
     * 放款待审核
     */
    LOAN_WAIT_APPROVE("waitApprove", "放款待审核"),
    /**
     * 暂停等待
     */
    SUSPEND_WAIT("suspendWait", "暂停等待"),
    /**
     * 放款待确认
     */
    LOAN_WAIT_CONFIRM("waitConfirm", "放款待确认"),
    /**
     * 复核退回
     */
    LOAN_REVIEW_RETURN("reviewReturn", "复核退回"),
    /**
     * 补件
     */
    LOAN_REPAIR("repair", "补件"),
    /**
     * 退件
     */
    LOAN_RETURN("return", "退件"),
    /**
     * 预审通过
     */
    LOAN_PRE_APPROVE("preApprove", "预审通过"),
    /**
     * 放款审核通过
     */
    LOAN_APPROVE_DONE("approveDone", "放款审核通过"),
    //add by yk.Li 2020/08/14
    WAIT_ASSIGN("waitAssign","异常待分配"),
    //add by rongji.zhang 2020/08/27
    LOAN_DISCARD("discard","合同取消"),
    FLAT_CANCEL("flatCancel","FLAT CANCEL"),
    /**
     * add by fangchenliang
     */
    ASSIGNING("assigning","分配中"),
    ;



    public String state;
    public String desc;

    ApplyStatusEnum(String state, String desc) {
        this.state = state;
        this.desc = desc;
    }

    public static String getDescBystate(String state) {
        for (ApplyStatusEnum info : values()) {
            if (state.equals(info.getState())) {
                return info.getDesc();
            }
        }
        return null;
    }
}
